export let ConvertNumberToLetter = (number) => {
  let num1 = Math.floor(number / 26);
  let num2 = number % 26;

  if (num2 == 0) {
    num1--;
    num2 = 26;
  }

  let letter1 = "";
  let letter2 = "";
  if (num1 > 0) {
    letter1 = String.fromCharCode(64 + num1);
  }
  if (num2 > 0) {
    letter2 = String.fromCharCode(64 + num2);
  }

  return letter1 + letter2;
};

export let GetOffsetSize = function (node, offset) {
  if (!offset) {
    offset = {
      x: 0,
      y: 0,
    };
  }
  if (node === document.body) return offset;
  offset.x = offset.x + node.offsetLeft;
  offset.y = offset.y + node.offsetTop;
  return GetOffsetSize(node.offsetParent, offset);
};
